<template>
  <div>
    <h2>修改: {{ person.name }} - {{ person.age }} - {{ person.job.j1.salary }}</h2>
    <input type="text" v-model="person.name">
    <input type="number" v-model="person.age">
    <input type="number" v-model="person.job.j1.salary">
  </div>
</template>

<script>
import { watchEffect, reactive } from 'vue'
export default {
  setup() {
    const person = reactive({
      name: 'jack',
      age: 18,
      job: {
        j1: {
          salary: 20
        }
      }
    })
    watchEffect(() => {
      let obj = { ...person }
      console.log(obj)
    })
    return {
      person
    }
  }
}
</script>

<style>

</style>